package br.com.testkiller;

import java.util.*;

public class MyInt implements Comparable{
	public static void main(String [] args){
	ArrayList<MyInt> list = new ArrayList<MyInt>();
	list.add(new MyInt(2));
	list.add(new MyInt(1));
	Collections.sort(list);	
	}
	private int i;
		public MyInt(int i ){
		this.i = i;
		}
		public String toString(){
			return Integer.toString(i);
		}		
		@Override
		public int compareTo(Object o) {
			MyInt i2 = (MyInt)o;
			return i - i2.i;
			
		}
		
}